import { upload } from '~/utils/request'

/**
 * 图片上传
 * @param image 图片二进制数据
 * @returns {Promise<any>} 结果
 */
export function imageUpload(image: File) {
  return upload('/upload/image', image)
}

/**
 * 附件上传
 * @param attachment 附件二进制数据
 * @returns {Promise<any>} 结果
 */
export function attachmentUpload(attachment: File) {
  return upload('/upload/ticket-attachment', attachment)
}
